/**
 * 
 */
package niuke.shenxinfu;

import java.util.Scanner;

/**
 * @author zhongfang
 *
 */
public class 乘积 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			double x = scanner.nextDouble();
			if (x < 0 || x > 100) {
				System.out.println("Error");
			} else if (x >= 90) {
				System.out.println("A+");
			} else if (x >= 80) {
				System.out.println("A");
			} else if (x >= 70) {
				System.out.println("B+");
			} else if (x >= 60) {
				System.out.println("B");
			} else {
				System.out.println("C");
			}
		}
	}

}
